package com.zhangsr.zus.config.spring.schema;

import com.zhangsr.zus.config.api.ZusProtocolConfig;
import com.zhangsr.zus.config.spring.ReferenceBean;
import com.zhangsr.zus.config.spring.ServiceBean;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;

/**
 * @Author: zhangsr
 */
public class ZusNamespaceHandler extends NamespaceHandlerSupport {

    public void init() {
        registerBeanDefinitionParser("protocol", new ZusBeanDefinitionParser(ZusProtocolConfig.class, true));
        registerBeanDefinitionParser("service", new ZusBeanDefinitionParser(ServiceBean.class, true));
        registerBeanDefinitionParser("reference", new ZusBeanDefinitionParser(ReferenceBean.class, true));
    }
}
